<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文件库 - 机勘院智能业务系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" rel="stylesheet">
    <link href="../css/main.css" rel="stylesheet">
</head>
<body class="deepseek-admin">
    <!-- 顶部导航栏 -->
    <header class="deepseek-header">
        <div class="container-fluid">
            <div class="row align-items-center">
                <div class="col">
                    <button id="sidebarToggle" class="btn btn-link text-white">
                        <i class="fas fa-bars"></i>
                    </button>
                    <span class="ms-2 fw-bold">文件库</span>
                </div>
                <div class="col-auto">
                    <div class="d-flex align-items-center">
                        <button id="toggleDarkMode" class="btn btn-link text-white me-3" title="切换暗色模式">
                            <i class="fas fa-moon"></i>
                        </button>
                        <div class="dropdown">
                            <button class="btn btn-link text-white dropdown-toggle" data-bs-toggle="dropdown">
                                <i class="fas fa-user-circle"></i>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-end">
                                <li><a class="dropdown-item" href="#"><i class="fas fa-user me-2"></i>个人信息</a></li>
                                <li><a class="dropdown-item" href="#"><i class="fas fa-cog me-2"></i>账号设置</a></li>
                                <li><hr class="dropdown-divider"></li>
                                <li><a class="dropdown-item" href="#"><i class="fas fa-sign-out-alt me-2"></i>退出登录</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- 侧边栏 -->
    <nav class="deepseek-sidebar">
        <div class="deepseek-sidebar-content">
            <div class="deepseek-logo mb-4">
                <img src="../images/logo.png" alt="智能业务 Logo">
            </div>
            <ul class="deepseek-nav">
                <li>
                    <a href="#" class="deepseek-nav-item active" data-tab="all-files-tab">
                        <i class="fas fa-folder"></i>
                        <span>全部文件</span>
                    </a>
                </li>
                <li>
                    <a href="#" class="deepseek-nav-item" data-tab="recent-files-tab">
                        <i class="fas fa-clock"></i>
                        <span>最近文件</span>
                    </a>
                </li>
                <li>
                    <a href="#" class="deepseek-nav-item" data-tab="favorites-tab">
                        <i class="fas fa-star"></i>
                        <span>收藏夹</span>
                    </a>
                </li>
                <li>
                    <a href="#" class="deepseek-nav-item" data-tab="shared-files-tab">
                        <i class="fas fa-share-alt"></i>
                        <span>共享文件</span>
                    </a>
                </li>
                <li>
                    <a href="#" class="deepseek-nav-item" data-tab="trash-tab">
                        <i class="fas fa-trash-alt"></i>
                        <span>回收站</span>
                    </a>
                </li>
            </ul>
            
            <div class="storage-info mt-4 p-3">
                <h6 class="text-muted">存储空间</h6>
                <div class="progress mb-2">
                    <div class="progress-bar" role="progressbar" style="width: 65%"></div>
                </div>
                <small class="text-muted">已使用 65GB / 100GB</small>
            </div>
        </div>
    </nav>

    <!-- 主要内容区域 -->
    <main class="deepseek-main">
        <div class="container-fluid py-4">
            <!-- 工具栏 -->
            <div class="mb-4">
                <div class="row align-items-center">
                    <div class="col">
                        <div class="btn-group">
                            <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadModal">
                                <i class="fas fa-upload me-1"></i>上传文件
                            </button>
                            <button class="btn btn-outline-secondary">
                                <i class="fas fa-folder-plus me-1"></i>新建文件夹
                            </button>
                        </div>
                    </div>
                    <div class="col-auto">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="搜索文件...">
                            <button class="btn btn-outline-secondary">
                                <i class="fas fa-search"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 文件列表 -->
            <div class="card">
                <div class="card-header">
                    <div class="row align-items-center">
                        <div class="col">
                            <div class="btn-group btn-group-sm">
                                <button class="btn btn-outline-secondary active">
                                    <i class="fas fa-th-large"></i>
                                </button>
                                <button class="btn btn-outline-secondary">
                                    <i class="fas fa-list"></i>
                                </button>
                            </div>
                        </div>
                        <div class="col-auto">
                            <select class="form-select form-select-sm">
                                <option value="name">按名称排序</option>
                                <option value="date">按日期排序</option>
                                <option value="size">按大小排序</option>
                                <option value="type">按类型排序</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="card-body">
                    <div class="row g-3" id="fileGrid">
                        <!-- 文件夹 -->
                        <div class="col-md-3 col-lg-2">
                            <div class="file-item folder">
                                <div class="file-icon">
                                    <i class="fas fa-folder fa-3x"></i>
                                </div>
                                <div class="file-info">
                                    <div class="file-name">道路勘察项目</div>
                                    <div class="file-meta">
                                        <small class="text-muted">10个文件</small>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- Word文档 -->
                        <div class="col-md-3 col-lg-2">
                            <div class="file-item">
                                <div class="file-icon">
                                    <i class="fas fa-file-word fa-3x text-primary"></i>
                                </div>
                                <div class="file-info">
                                    <div class="file-name">勘察报告.docx</div>
                                    <div class="file-meta">
                                        <small class="text-muted">2.5MB · 昨天</small>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- Excel文档 -->
                        <div class="col-md-3 col-lg-2">
                            <div class="file-item">
                                <div class="file-icon">
                                    <i class="fas fa-file-excel fa-3x text-success"></i>
                                </div>
                                <div class="file-info">
                                    <div class="file-name">数据分析.xlsx</div>
                                    <div class="file-meta">
                                        <small class="text-muted">1.8MB · 2天前</small>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- PDF文档 -->
                        <div class="col-md-3 col-lg-2">
                            <div class="file-item">
                                <div class="file-icon">
                                    <i class="fas fa-file-pdf fa-3x text-danger"></i>
                                </div>
                                <div class="file-info">
                                    <div class="file-name">技术规范.pdf</div>
                                    <div class="file-meta">
                                        <small class="text-muted">5.2MB · 3天前</small>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 上传文件模态框 -->
    <div class="modal fade" id="uploadModal" tabindex="-1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">上传文件</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>
                <div class="modal-body">
                    <div class="upload-area mb-3">
                        <div class="text-center p-5 border rounded">
                            <i class="fas fa-cloud-upload-alt fa-3x text-muted mb-3"></i>
                            <p class="mb-0">拖放文件到此处或点击选择文件</p>
                            <input type="file" class="d-none" id="fileInput" multiple>
                        </div>
                    </div>
                    <div class="upload-list">
                        <!-- 上传列表将由JavaScript动态添加 -->
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="startUpload">开始上传</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 文件预览模态框 -->
    <div class="modal fade" id="previewModal" tabindex="-1">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">文件预览</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>
                <div class="modal-body">
                    <div class="preview-container">
                        <!-- 预览内容将由JavaScript动态添加 -->
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary">
                        <i class="fas fa-download me-1"></i>下载
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- JavaScript依赖 -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script src="../js/files.js"></script>
</body>
</html> 